package com.cloud.neo4j.controller;

import com.cloud.neo4j.entity.RelationShip;
import com.cloud.neo4j.service.DeptService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class DeptController {


    @Resource
    private DeptService deptService;

    @GetMapping("create")
    public void create(){
        deptService.create();
    }

    @GetMapping("get")
    public RelationShip get(Long id){
        return deptService.get(id);
    }

    @GetMapping("deleteRelationShip")
    public void deleteRelationShip(Long id){
        deptService.deleteRelationShip(id);
    }

    @GetMapping("deleteDept")
    public void deleteDept(Long id){
        deptService.deleteDept(id);
    }

    @GetMapping("deleteAll")
    public void deleteAll(){
        deptService.deleteAll();
    }
}
